BMEN90033 · Week 9
Back
BMEN90033 · WEEK 9 · SCHMITT TRIGGER

The Schmitt trigger

A plain comparator transitions on every threshold crossing of its input, so noise at the reference produces a burst of edges. The Schmitt trigger replaces the single threshold with two state-dependent thresholds separated by a hysteresis band. After each transition the input must reverse by the full width of the band before the next transition can occur. The following sections derive the threshold pair, examine the hysteresis loop, apply the circuit to a noisy ECG channel, and consider how the band is sized for R-wave detection and contact debouncing.

positive feedback hysteresis two thresholds noise immunity r-wave detection
scroll
01circuit and threshold derivation

The non-inverting Schmitt trigger

The input enters the non-inverting terminal through $R_1$. A second resistor $R_2$ returns the output to the same node and supplies positive feedback. The inverting terminal is grounded, so the comparator switches whenever the non-inverting node crosses zero. Because the output takes one of two saturation values, the voltage at the non-inverting node also takes one of two values, and the input therefore sees two effective thresholds.

Superposition at the non-inverting node gives

$$V_+ = v_\text{in}\,\frac{R_2}{R_1+R_2} + v_\text{out}\,\frac{R_1}{R_1+R_2}.$$

Setting $V_+ = 0$ and substituting the two possible output values yields the threshold pair,

$$V_\text{TH} = +V_\text{sat}\,\frac{R_1}{R_2}, \qquad V_\text{TL} = -V_\text{sat}\,\frac{R_1}{R_2}.$$

While $v_\text{out} = -V_\text{sat}$, a rising input must reach $V_\text{TH}$ before the output flips high. While $v_\text{out} = +V_\text{sat}$, a falling input must reach $V_\text{TL}$ before the output flips low. The width of the hysteresis band is

$$\Delta V = V_\text{TH} - V_\text{TL} = 2\,V_\text{sat}\,\frac{R_1}{R_2}.$$

The band is symmetric about ground because the inverting input is tied to ground. Offsetting that input shifts both thresholds together without changing the width. The width itself depends only on the resistor ratio and the rail separation, not on the absolute resistance values.

Stability of the positive feedback path

Positive feedback is destabilising in the linear region of an op-amp and is normally avoided. The Schmitt trigger operates outside that region: the output is already at a rail before the feedback takes effect. The fraction returned to the non-inverting input reinforces the existing saturation rather than driving the output away from a quiescent point. The circuit has two stable states and no third equilibrium for the feedback to destabilise.

The thresholds are state-dependent. While $v_\text{out} = +V_\text{sat}$, the comparator waits for $v_\text{in} < V_\text{TL}$. After the output flips to $-V_\text{sat}$, it waits for $v_\text{in} > V_\text{TH}$. The input must reverse by at least $\Delta V$ to produce a second transition.
circuit · non-inverting Schmitt trigger
02feedback divider and operating zones

How the feedback divider sets the thresholds

The non-inverting node is a summing junction for $v_\text{in}$ through $R_1$ and $v_\text{out}$ through $R_2$. The comparator switches when the junction voltage crosses zero, so each stable output state pins the junction to a different threshold of the input. The two panels on the right show this directly: the schematic carries live values for $R_1$, $R_2$ and $v_\text{in}$, and the voltage rule shows $v_\text{in}$ relative to the two thresholds and the direction it must move to flip the output.

Effect of the controls

The output wire is drawn green when $v_\text{out} = +V_\text{sat}$ and red when $v_\text{out} = -V_\text{sat}$. The same colour appears on the cursor at the right edge of the test signal and on the state badge above, so the two panels read as a single live circuit.
feedback $\beta$ 0.20 test signal amplitude 2.40 V frequency 0.25 Hz
live circuit · non-inverting Schmitt trigger
operating zones · test signal sweeping the thresholds
03noise rejection on a streaming biosignal

Schmitt trigger applied to a noisy ECG channel

A plain comparator transitions on every crossing of its threshold, including those produced by noise. The Schmitt trigger suppresses all crossings that lie inside the hysteresis band and produces a single transition for each genuine excursion of the underlying signal. The animation scrolls a synthetic, noise-corrupted ECG waveform through both circuits in parallel, so the difference is visible directly.

The top trace is the noisy input together with the reference $V_\text{ref}$ and, for non-zero hysteresis, the thresholds $V_\text{TH}$ and $V_\text{TL}$. The middle trace is the output of a plain comparator referenced to $V_\text{ref}$. The bottom trace is the output of a Schmitt trigger with the hysteresis set on the slider.

Observations

The noise rejection is obtained without low-pass filtering. The frequency content of the input is preserved at the moment of the genuine crossing, so the Schmitt trigger introduces no phase delay in the front-end signal. The circuit is therefore preferred over additional filtering when the timing of the crossing carries the information of interest, as in R-wave detection.
noise level 0.18 V reference $V_\text{ref}$ 0.40 V hysteresis $\Delta V$ 0.55 V scroll 1.00x
streaming · noisy biosignal, plain comparator, Schmitt trigger
04applications in bioinstrumentation

Sizing the hysteresis band

The width of the hysteresis band is the principal design parameter of a Schmitt-based front end. The following examples show how the band is chosen against the noise statistics and the required transition behaviour.

R-wave detection

An ECG channel for heart-rate counting is bandpass filtered to isolate the QRS complex, amplified to a peak excursion of approximately one volt, and passed through a Schmitt trigger whose output drives a counter. The reference is placed near the centre of the expected R-wave, and the hysteresis is set to exceed the peak-to-peak noise at the comparator input. The dominant noise sources are EMG within the QRS passband, residual mains pickup that survives the instrumentation amplifier, and electrode-skin half-cell drift. A common rule selects $\Delta V$ at approximately half the expected R-wave amplitude. The detector then produces one edge per heartbeat with a timing jitter set by the slope of the QRS at the reference, not by the noise excursion across it.

If $\Delta V$ is too large, the input must climb well past the nominal reference before transitioning. This introduces a systematic delay and reduces sensitivity to low-amplitude beats. If $\Delta V$ is too small, the output retains the chatter of the plain comparator. The optimum depends on the peak-to-peak noise during the QRS interval, not on the average noise of the channel.

Switch and contact debouncing

Mechanical switches do not transition cleanly. A button pressed against its contact bounces several times over a few milliseconds before settling, and a digital input that samples the switch directly will register multiple presses. A Schmitt trigger placed between the switch and the logic input absorbs the bounces, provided the hysteresis exceeds the residual fluctuation of the contact and the signal voltage sits well clear of each threshold during the steady portions of the press and release. Patient-worn devices with event-marker buttons commonly use this arrangement.

Threshold detection of evoked responses

Stimulus-locked recordings often require the detection of evoked potentials whose amplitude exceeds a fixed threshold. A Schmitt trigger with $V_\text{ref}$ set at the desired amplitude and $\Delta V$ matched to the expected interpulse noise produces a single trigger per evoked response, independent of small fluctuations of the recorded waveform. The output edge is used to time-stamp the response or to advance an averaging buffer.

The hysteresis band converts a noisy analogue signal into a clean digital edge without filtering. The cost is a state-dependent threshold and a small timing offset at each transition. In each application above the offset is acceptable: the timing information of interest is fixed by the slope of the signal at the threshold, and the counter or averaging stages downstream tolerate a constant systematic delay.
sizing · R-wave with peak-to-peak noise envelope and chosen $\Delta V$